package com.eclipse.org.snms.summary;

import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;

public class MainClass extends ApplicationWindow {
  public MainClass() {
    super(null);
  }

  public void run() {
    setBlockOnOpen(true);
    open();
    Display.getCurrent().dispose();
  }

  protected Control createContents(Composite parent) {
	  
	  GridLayout gLayout = new GridLayout(2,true);
	  parent.setLayout(gLayout);
		
	  Button closeButton = new Button(parent,0);
	  closeButton.setText("close");
	  Label label = new Label(parent, 0);
	  label.setText("Hello, World");
   
	  return parent;
  }

  public static void main(String[] args) {
    new MainClass().run();
  }
}